from pydantic_settings import BaseSettings, SettingsConfigDict
from typing import Optional

class Settings(BaseSettings):
    database_url: str = "postgresql://chatbot:123456@localhost:5432/mydb"
    mongodb_url: str = "mongodb://chatbot:123456@localhost:27017/chatbot_db?authSource=admin"
    redis_url: Optional[str] = "redis://localhost:6379/0"
    
    api_prefix: str = "/api"
    api_version: str = "v1"
    debug: bool = True
    
    db_pool_min_size: int = 10
    db_pool_max_size: int = 50
    mongodb_max_pool_size: int = 50
    
    model_config = SettingsConfigDict(
        env_file=".env",
        env_file_encoding="utf-8",
        extra="ignore"
    )

settings = Settings()
